<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8"/>
	<title>管理员操作日志列表--layui后台管理模板</title>
	<link rel="stylesheet" type="text/css" th:href="@{/layui/css/layui.css}" media="all" />
	<link rel="stylesheet" type="text/css" th:href="@{/css/news.css}" media="all" />
</head>
<body class="childrenBody">
	<blockquote class="layui-elem-quote news_search">
	<form id="searchForm" name="searchForm" class="layui-form" action="/syslog/operateLog.html">
		<input type="hidden" id="pageNum" name="pageNum" th:value="${page}?${page.pageNum}"/>
		  <div class="layui-form-item">
			<label class="layui-form-label">操作人:</label>
		    <div class="layui-input-inline">
		    	 <input  type="text" class="layui-input" name="operator"  th:value="${operateLogVo}?${operateLogVo.operator}"/>
		    </div>
			<label class="layui-form-label">IP地址:</label>
		    <div class="layui-input-inline">
		    	 <input  type="text" class="layui-input" name="ip"  th:value="${operateLogVo}?${operateLogVo.ip}"/>
		    </div>
		      <label class="layui-form-label">内容:</label>
		    <div class="layui-input-inline">
		    	 <input  type="text" class="layui-input" name="content"  th:value="${operateLogVo}?${operateLogVo.content}"/>
		    </div>
		    <button class="layui-btn search_btn"><i class="layui-icon">&#xe615;</i>查询</button>
         </div>
	</form>
	</blockquote>
	<div class="layui-form news_list">
	  	<table class="layui-table">
		    <colgroup>
				<col/>
				<col/>
				<col/>
				<col/>
		    </colgroup>
		    <thead>
				<tr>
					<th>操作人</th>
					<th>操作时间</th>
					<th>IP地址</th>
					<th>操作内容</th>
					<th>操作结果</th>
				<!-- 	<th>操作</th> -->
				</tr> 
		    </thead>
		    <tbody class="news_content">
		  	  <th:block th:if="${not #lists.isEmpty(page.list)}">
			    	<tr th:each="item:${page.list}">
				    	<td  th:text="${item.operator}"></td>
				    	<td  th:text="${#dates.format(item.createTime,'yyyy-MM-dd HH:mm:ss')}"></td>
				    	<td  th:text="${item.ip}"></td>
				    	<td  th:text="${item.content}"></td>
				    	<td  th:text="${item.result}"></td>
				   <!--  	<td>
                          <a th:data="${item.id}"  class="layui-btn layui-btn-mini dictionary_view">查看</a>
						</td> -->
					</tr>
				</th:block>
		    </tbody>
		</table>
	</div>
	<div id="paged" align="right"></div>
	<script type="text/javascript" th:src="@{/layui/layui.js}"></script>
	<script type="text/javascript" th:src="@{/jquery/jquery-3.2.1.min.js}"></script>
	</body>
	<script th:inline="javascript">
         layui.use('laypage', function(){             
        	  var laypage = layui.laypage,$=layui.jquery;
        	  //执行一个laypage实例
        	  laypage.render({
        	    elem: 'paged', //注意，这里的 test1 是 ID，不用加 # 号
        	    curr: [[${page.pageNum}]],
        	    count: [[${page.total}]], //数据总数，从服务端得到
        	    layout: ['count', 'prev', 'page', 'next'],
                jump: function(obj, first){
                    //得到了当前页，用于向服务端请求对应数据
                    var curr = obj.curr;
                    $("#pageNum").val(curr);
                    if(!first) {
                        $("#searchForm").submit();
					}
                }
        	  });
        	});
        
     
        
         layui.use('laydate', function(){
        	  var laydate = layui.laydate;
        	  //执行一个laydate实例
        	  laydate.render({
        	    elem: '#startTime' //指定元素
        	    ,format: 'yyyy-MM-dd HH:mm:ss'
        	  });
        	  //执行一个laydate实例
        	  laydate.render({
        	    elem: '#endTime' //指定元素
        	    ,format: 'yyyy-MM-dd HH:mm:ss'
        	  });
        	});  
	</script>
</html>